import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../components/home/Home'
import Index from '../components/home/Index'
import HouseList from '../components/home/HouseList'
import News from '../components/home/News'
import My from '../components/home/My'

Vue.use(VueRouter)

const routes = [{
  path: '/',
  component: Home,
  redirect: '/index',
  children: [
    { path: '/index', component: Index },
    { path: '/houselist', component: HouseList },
    { path: '/new', component: News },
    { path: '/my', component: My }

  ]
}
]

const router = new VueRouter({
  mode: 'history',
  routes
})

export default router
